Technical Q&A
CS 13 - Missing ColorSync Profiles (3-May-99)
Q: I've just installed ColorSync 2.6 and noticed some of my profiles no
longer show up in the ColorSync control panel or the ColorSync plug-ins pop-up menus,
even though they are properly installed in the "ColorSync Profiles" folder? What's going on?
A: One important change in the recent release of ColorSync (version 2.6) is
how it handles the description ('desc' ) tag of ICC profiles.
The 'desc' tag of a profile, as defined by the ICC, contains up to three
strings. The first is a required 7-bit roman ASCII string. The second is an
optional localized Unicode string. The third, also optional, is a localized
string in Mac script-code format. Applications typically use one of the
available strings to show the name of profiles in a list or pop-up menu.
There are a few other important devilish details in the ICC definition of
the 'desc' tag. One is that all three strings must be null terminated.
Another is that all three strings are preceded by a character count that
includes the null terminator. It also worth noting that for the Unicode
string, the character count must not be confused with a byte count because
each Unicode character requires two bytes.
Previous releases of ColorSync only make partial use of this tag and as a
result performed only limited error checking on its contents. For example,
the ColorSync function CMGetScriptProfileDescription would return the Mac
script-code from a profile if it was present and, if not, it would return
the 7-bit roman ASCII string. The Unicode string was simply ignored and in
some cases, if the Unicode and/or Mac script-code string were non-compliant,
ColorSync would return garbage (or the ACSII string if you were lucky)
without returning cmProfileErr code.
ColorSync 2.6 provides a new function, CMGetProfileDescriptions , to give the
user access to all three possible strings in the 'desc' tag. In doing so
much stricter attention had to be paid to the compliance of the 'desc' tag.
For example, if either the ASCII string or the Mac script-code strings is
not null terminated or if any of the string's character counts are invalid
or beyond the range of the 'desc' tag, the and cmProfileErr code is
returned.
In order to achieve optimal performance when applications add profiles to a
list or pop-up menu, ColorSync maintains a cache of all the profiles
installed in the "ColorSync Profiles" folder and its sub-directories. Among
other things, this cache file contains the three possible names of each
profile obtained by calling CMGetProfileDescriptions . If
CMGetProfileDescriptions returns an error because the 'desc' tag is
non-compliant, then the profile is not added to the cache. This is why
non-compliant profiles--even though they are properly installed in the
"ColorSync Profiles" folder--no longer show up in the ColorSync control
panel or the ColorSync plug-ins pop-up menus with ColorSync 2.6 installed.
The remedy for this problem is to repair the affected profiles.
Unfortunately the "Rename Profile" AppleScript that is installed as part of
ColorSync 2.6 cannot be used to repair profiles with bad 'desc' tags because
it can only operate on profiles in the ColorSync profile cache. Instead, a
simple stand-alone tool called "Profile First Aid" to verify and repair any
profile will be made available on the the ColorSync web site.
-- David Hayward and Scott Kuechle
Worldwide Developer Technical Support
Technical Q&As | Contents
Previous Question
To contact us, please use the Contact Us page.
|